package com.ruoyi.common.entity.CoreEntity.store;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 门店用户信息对象 store_user
 * 
 * @author Sxz
 * @date 2025-08-07
 */
public class StoreUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 所属商户ID（关联 store_info） */
    @Excel(name = "所属商户ID", readConverterExp = "关=联,s=tore_info")
    private Long storeId;

    /** 登录用户名 */
    @Excel(name = "登录用户名")
    private String username;

    /** 加密后的密码 */
    @Excel(name = "加密后的密码")
    private String password;

    /** 用户角色（1-管理员，2-店员） */
    @Excel(name = "用户角色", readConverterExp = "1=-管理员，2-店员")
    private Long role;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String phone;

    /** 邮箱（可用于找回密码） */
    @Excel(name = "邮箱", readConverterExp = "可=用于找回密码")
    private String email;

    /** 用户状态（0-禁用，1-启用） */
    @Excel(name = "用户状态", readConverterExp = "0=-禁用，1-启用")
    private Long status;

    /** 逻辑删除标志（0-未删除，1-已删除） */
    @TableLogic
    private String delFlag;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastLoginTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setStoreId(Long storeId) 
    {
        this.storeId = storeId;
    }

    public Long getStoreId() 
    {
        return storeId;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }

    public void setRole(Long role) 
    {
        this.role = role;
    }

    public Long getRole() 
    {
        return role;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }

    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setLastLoginTime(Date lastLoginTime) 
    {
        this.lastLoginTime = lastLoginTime;
    }

    public Date getLastLoginTime() 
    {
        return lastLoginTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("storeId", getStoreId())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("role", getRole())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("lastLoginTime", getLastLoginTime())
            .append("createTime", getCreateTime())
            .toString();
    }
}
